uint8 pin
bool flag
bool state
